package com.rerun.controller.system;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.baomidou.mybatisplus.plugins.Page;
import com.rerun.common.controller.SuperController;
import com.rerun.entity.PhoneLog;
import com.rerun.service.IPhoneLogService;

/**
 * Created with IntelliJ IDEA.
 * Author: Dax
 * Description:
 * Date: 2017/10/1
 * Time: 13:52
 */
@Controller
@RequestMapping("/system")
public class AppPhoneLogController extends SuperController{
	@Autowired
    private IPhoneLogService phoneLogService;
    
	@RequestMapping(value="/PhoneLogList/{pageNumber}" )
	public String showPhoneLog(Model model, PhoneLog  phoneLog,  @PathVariable("pageNumber") Integer pageNumber,
			@RequestParam(defaultValue = "15") Integer pageSize){
		//获取页码 条数
		Page<PhoneLog> page = getPage(pageNumber, pageSize);
		model.addAttribute("pageSize", pageSize);
    	 Page<PhoneLog> showPhoneLog = phoneLogService.showPhoneLog(page, phoneLog);
    	model.addAttribute("PhoneLog", phoneLog);
    	model.addAttribute("pageData", showPhoneLog);
		return "system/appLogList/list";
	}

}
